<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
        .table1{
            border:1px solid #ddd;
            width:900px;
            
        }
        thead{
            background-color:lightblue;
        }

    </style>
</head>
<body>
<table border="0" width="900px">
    <tr>
        <td align="center" style="font-size:24px; color:#666">员工管理</td>
    </tr>
    <tr>
        <td align="right" > <a href="${pageContext.request.contextPath}/employee/add">添加</a></td>
    </tr>
</table>

<br/>

<table cellspacing="0" border="1" class="table1">
<thead>
  <tr>
	<td align="center">编号</td>
	<td align="center">员工姓名</td>
	<td align="center">性别</td>
	<td align="center">出生日期</td>
	<td align="center">入职时间</td>
	<td align="center">所属部门</td>
	<td align="center">编辑</td>
	<td align="center">删除</td>
  </tr>
</thead>
<tbody>
  <c:forEach var="sk" items="${requestScope.pageBean.list}">
    <tr>
		<td align="center">${sk.eno}</td>
		<td align="center">${sk.ename }</td>
		<td align="center">${sk.sex }</td>
		<td align="center"><fmt:formatDate value="${sk.birthday}" pattern="yyyy-MM-dd" /></td>
		<td align="center"><fmt:formatDate value="${sk.joinDate}" pattern="yyyy-MM-dd" /></td>
		<td align="center">${sk.department.dname }</td>
		<td align="center"><a href="${pageContext.request.contextPath}/employee/edit/${sk.eid}"><img src="${pageContext.request.contextPath}/images/edit.png" /></a></td>
		<td align="center"><a href="${pageContext.request.contextPath}/employee/delete/${sk.eid}"><img src="${pageContext.request.contextPath}/images/nolines_minus.gif" /></a></td>
    </tr>
    </c:forEach>
</tbody>
</table>
<br/>

<table border="0" cellspacing="0" cellpadding="0"  width="900px">
<tr>
<td align="right">
   <span>第${requestScope.pageBean.currPage }/${requestScope.pageBean.totalPage }页</span>
   <span>总记录数：${requestScope.pageBean.totalCount }每页显示:${requestScope.pageBean.pageSize }</span>
   <span>
   <c:if test="${requestScope.pageBean.currPage != 1 }">
       <a href="${pageContext.request.contextPath}/employee/list?currentPage=1">[首页]</a>&nbsp;&nbsp;
       <a href="${pageContext.request.contextPath}/employee/list?currentPage=${requestScope.pageBean.currPage - 1}">[上一页]</a>&nbsp;&nbsp;
   </c:if>  
   <c:if test="${requestScope.pageBean.currPage != requestScope.pageBean.totalPage }">  
       <a href="${pageContext.request.contextPath}/employee/list?currentPage=${requestScope.pageBean.currPage + 1}">[下一页]</a>&nbsp;&nbsp;
       <a href="${pageContext.request.contextPath}/employee/list?currentPage=${requestScope.pageBean.totalPage}">[尾页]</a>&nbsp;&nbsp;
   </c:if>
   </span>
</td>
</tr>
</table>
</body>
</html>